reentrant functionsIn the design of real-time systems, multiple tasks often call the same function. If this function is unfortunately designed to be a non-reentrant function, then different tasks calling this function may modify the data of other
reentrant functionsIn the design of real-time systems, multiple tasks often call the same function. If this function is unfortunately designed to be a non-reentrant function, then different tasks calling this function may modify the data of other
1. reentrant function
A function is reentrant if it can be safely recursive or called in parallel. To become a reentrant function, the function cannot contain (or use) static (or global) data (to store state information during a function call), nor
Thread-Safe functions:When a function is called concurrently by multiple concurrently executing threads, it produces the correct result.reentrant functions :Re-entry can be repeated, meaning that the function can be interrupted.In multi-threaded or
Thread Safety : a function is called thread-safe (thread-safe), and it always produces the correct result when it is called repeatedly by multiple concurrent processes. If a function is not thread-safe, we say it is thread insecure (thread-unsafe).
Introduction:A set of concurrent threads runs in the same process context, with each thread having its own separate thread context, including thread ID, stack, stack pointer, program counter, condition code, and general purpose register. Each thread
Http://docs.sun.com/app/docs/doc/819-7051?l=zh "Multithreaded Programming Guide"
An excerpt from the "Apue"
POSIX and ISO c define errno as such a symbol, which expands into a modifiable integer left value (lvalue). This can be an integer that
This article mainly introduces the deadlocks, reentrant locks, and mutex locks in Python. although Python GIL problems in thread programming are commonplace, you can refer
I. deadlock
To put it simply, a deadlock occurs when a resource is called
I. reentrant Functions
1) What is reentrant?
The reentrant function can be used concurrently by more than one task without worrying about data errors. Conversely, non-reentrant functions cannot be shared by more than one task, unless they ensure
The following memory is reprinted:
Source Address: http://blog.csdn.net/yueyahe/archive/2006/05/15/729126.aspx
I. reentrant Functions1) What is reentrant?The reentrant function can be used concurrently by more than one task without worrying
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.